<!DOCTYPE>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="description"
        content="Vali is a responsive and free admin theme built with Bootstrap 4, SASS and PUG.js. It's fully customizable and modular.">
    <!-- Twitter meta-->
    <meta property="twitter:card" content="summary_large_image">
    <meta property="twitter:site" content="@pratikborsadiya">
    <meta property="twitter:creator" content="@pratikborsadiya">
    <!-- Open Graph Meta-->
    <meta property="og:type" content="website">
    <meta property="og:site_name" content="Vali Admin">
    <meta property="og:title" content="Vali - Free Bootstrap 4 admin theme">
    <meta property="og:url" content="http://pratikborsadiya.in/blog/vali-admin">
    <meta property="og:image" content="http://pratikborsadiya.in/blog/vali-admin/hero-social.png">
    <meta property="og:description"
        content="Vali is a responsive and free admin theme built with Bootstrap 4, SASS and PUG.js. It's fully customizable and modular.">
    <title>后台管理</title>
    <link href="https://cdn.bootcss.com/font-awesome/5.10.2/css/all.css" rel="stylesheet">
    <link rel="stylesheet"
        href="${request.contextPath}/admin/plugins/fontawesome-iconpicker/dist/css/fontawesome-iconpicker.min.css">
    <!-- Main CSS-->
    <link rel="stylesheet" type="text/css" href="${request.contextPath}/css/main.css">
    <!-- Font-icon css-->
    <link rel="stylesheet" type="text/css"
        href="${request.contextPath}/admin/plugins/font-awesome/css/font-awesome.min.css">
</head>

<body>
    <!-- Navbar-->
    <header class="app-header">
        <!-- 头部图标-->
        <a class="app-header__logo" href="#">天地华宇后台管理</a>
        <!-- 搜索-->
        <ul class="app-nav">
            <li class="app-search"><input class="app-search__input" type="search" placeholder="Search">
                <button class="app-search__button">
                    <i class="fa fa-search"></i>
                </button>
            </li>

            <!-- 用户-->
            <li class="dropdown">
                <a class="app-nav__item" href="#" data-toggle="dropdown" aria-label="Open Profile Menu">
                    <i class="fa fa-user fa-lg"></i>
                </a>
                <ul class="dropdown-menu settings-menu dropdown-menu-right">
                    <li>
                        <a class="dropdown-item" href="#"> 
                            <i class="fa fa-sign-out fa-lg"></i> 
                          	  退出
                        </a>
                        <a class="dropdown-item" href="/tdhy/index"> 
                            <i class="fa fa-sign-out fa-lg"></i> 
                            	返回首页
                        </a>
                    </li>
                </ul>
            </li>
        </ul>
    </header>
    <!-- 侧边栏-->
    <div class="app-sidebar__overlay" data-toggle="sidebar"></div>
    <aside class="app-sidebar">
        <!--管理员显示-->
        <div class="app-sidebar__user">
            <img class="app-sidebar__user-avatar" src="${request.contextPath}/images/admin.jpg" alt="User Image">
            <div>
                <p class="app-sidebar__user-name">管理员</p>
            </div>
        </div>
        <!-- 菜单 -->
        <ul class="app-menu">
            <#list backStage as menu>
                <li class="treeview">
                    <a href="" class="app-menu__item" data-toggle="treeview" onclick="iframeUrl('${menu.url}')">
                        <i class="app-menu__icon ${menu.icon}"></i>
                        <span class="app-menu__label">${menu.name}</span>
                        <i class="treeview-indicator fa fa-angle-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <#list menu.backMenuChildren as children>
                            <li>
                                <a class="treeview-item" href="javascript:void(0);"
                                    onclick="iframeUrl('${children.url}')">
                                    <i class="icon ${children.icon}"></i> ${children.name}
                                </a>
                            </li>
                        </#list>
                    </ul>
                </li>
            </#list>

        </ul>
    </aside>
    <main class="app-content">
        <iframe id="page" class="iframe" style="border-color:transparent;">

        </iframe>
    </main>

</body>
<!-- Essential javascripts for application to work-->
<script src="${request.contextPath}${staticPath}/admin/menujs/jquery-3.3.1.min.js"></script>
<script src="${request.contextPath}/admin/menujs/popper.min.js"></script>
<script src="${request.contextPath}/admin/menujs/bootstrap.min.js"></script>
<script src="${request.contextPath}/admin/menujs/main.js"></script>
<!-- The javascript plugin to display page loading on top-->
<script src="${request.contextPath}/admin/menujs/plugins/pace.min.js"></script>
<!-- Page specific javascripts-->
<script type="text/javascript" src="${request.contextPath}/admin/menujs/plugins/jquery.vmap.min.js"></script>
<script type="text/javascript" src="${request.contextPath}/admin/menujs/plugins/jquery.vmap.world.js"></script>
<script type="text/javascript" src="${request.contextPath}/admin/menujs/plugins/jquery.vmap.sampledata.js"></script>
<script type="text/javascript">
</script>
<!-- Google analytics script-->
<script type="text/javascript">
    if (document.location.hostname == 'pratikborsadiya.in') {
        (function (i, s, o, g, r, a, m) {
            i['GoogleAnalyticsObject'] = r;
            i[r] = i[r] || function () {
                (i[r].q = i[r].q || []).push(arguments)
            }, i[r].l = 1 * new Date();
            a = s.createElement(o), m = s.getElementsByTagName(o)[0];
            a.async = 1;
            a.src = g;
            m.parentNode.insertBefore(a, m)
        })(window, document, 'script',
            'https://www.google-analytics.com/analytics.js', 'ga');
        ga('create', 'UA-72504830-1', 'auto');
        ga('send', 'pageview');
    }

    function iframeUrl(url) {
        $("#page").attr("src", url);
    }

    // document.domain = "caibaojian.com";
    function setIframeHeight(iframe) {
        if (iframe) {
            var iframeWin = iframe.contentWindow || iframe.contentDocument.parentWindow;
            if (iframeWin.document.body) {
                iframe.height = iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight;
            }
        }
    };

    window.onload = function () {
        setIframeHeight(document.getElementById('page'));
    };
</script>

</html>